package tk3.project;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.ProgressBar;

public class Start extends Activity {
	ImageView imView; 
	ProgressBar pB;
	Intent intent;
	private int mProgressStatus = 0;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.start);
		
		imView=(ImageView)findViewById(R.id.imageView1);
		pB=(ProgressBar)findViewById(R.id.progressBar1);
		intent = new Intent(this, PicShareActivity.class);
		
		new Thread(new Runnable() {
            public void run() {
                while (mProgressStatus < 100) {
                	try {
    					Thread.sleep(15);
    				} catch (InterruptedException e) {
    					e.printStackTrace();
    				}
                	mProgressStatus++;
                	pB.setProgress(mProgressStatus);
                }
                startActivity(intent);
                finish();
            }
        }).start();

	}
	@Override
	 protected void onRestart() {
	  System.exit(0);
	 }
}